// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdLanguage
 */
public class AdLanguageDaoImpl
    extends org.tinaelle.server.domain.AdLanguageDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdLanguageDao#toAdLanguageDTO(org.tinaelle.server.domain.AdLanguage)
     */
    public org.tinaelle.common.dto.AdLanguageDTO toAdLanguageDTO(final org.tinaelle.server.domain.AdLanguage entity)
    {
        return super.toAdLanguageDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdLanguage loadAdLanguageFromAdLanguageDTO(org.tinaelle.common.dto.AdLanguageDTO adLanguageDTO)
    {
        org.tinaelle.server.domain.AdLanguage adLanguage = this.load(adLanguageDTO.getAdLanguageId());
        if (adLanguage == null)
        {
            adLanguage = org.tinaelle.server.domain.AdLanguage.Factory.newInstance();
        }
        return adLanguage;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdLanguageDao#adLanguageDTOToEntity(org.tinaelle.common.dto.AdLanguageDTO)
     */
    public org.tinaelle.server.domain.AdLanguage adLanguageDTOToEntity(org.tinaelle.common.dto.AdLanguageDTO adLanguageDTO)
    {
        org.tinaelle.server.domain.AdLanguage entity = this.loadAdLanguageFromAdLanguageDTO(adLanguageDTO);
        this.adLanguageDTOToEntity(adLanguageDTO, entity, true);
        return entity;
    }
}